<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title><?=$title?></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta  http-equiv="description" content="Free open source blog software based on codeigniter." />
<meta http-equiv="keywords" content="Free,open,source,blog,website,codeigniter,web design,speedovation,hosting" />
<meta http-equiv="author" content="Yash Bharadwaj" />
<link href="<?=base_url()?>themes/rs11/css/style.css" rel="stylesheet" type="text/css" />


</head>

<body>
<div id="wrap">
<div id="header">
<div id="topbar">
<div id="navigation">
  <ul>
    <li class="active"><?=anchor('blog/','Home');?></li>
	<?=$pages?>
  </ul>
  </div>
</div>
<div id="subnav">
	<?php 
		if($this->session->userdata('logged_in'))
        {?>
        	<?=$this->session->userdata('first_name')?>&nbsp;<?=$this->session->userdata('last_name')?> | <?=anchor('users/ViewProfile/'.$this->session->userdata('user_id'),'View Profile')?> | <?=anchor('users/Logout','Logout')?>
            <?php } else {?>		
			<?=anchor('users/Register','Register')?> | <?=anchor('users/Login','Login')?> | <?=anchor('users/ForgetPassword','Forget Password')?>
            <?php } ?>		
</div>
<h1 id="sitename" title="<?=$this->session->userdata('BLOGTitle')?>"><?=$this->session->userdata('BLOGName')?></h1>
</div>
<div id="content">

<div id="left"><?php

//we're checking for Guest permissions.Whether he can see the blog  or not.
                         if($this->session->userdata('GuestView')==1||$this->uri->segment(1)=="users")
                            echo $allposts;
                           else
						   echo "Please login! This is for members only site";
						   ?>
                        



</div>
<div id="sidebar">
<?php 
							//known bug two form can't work together working to remove this.
							 if($this->uri->segment(1)!="users" &&$this->uri->segment(2)!="do_search" )  { ?>
							<h2>Search</h2>&nbsp;
                            <?=$SearchForm; ?>
                            <? } ?>
<?php if($this->session->userdata('ShowCategories')==1) {?>
                            <h2>Categories</h2>
                            <?=$Categories?>
                            <?php }?>
                            
                            <?php if($this->session->userdata('ShowRecentPosts')==1) {?>
                             <h2>Latest Entries</h2>
                             <?=$RecentPosts?>
                            <?php }?>
                            
                            <?php if($this->session->userdata('ShowRecentComments')==1) {?>
                             <h2>Latest  Comments</h2>
                            <?=$RecentComments?>
                            <?php }?>
                             
                            <?php if($this->session->userdata('ShowArchives')==1) {?>
                            <h2>Archives</h2>
                            <?=$Archives?>
                           	<?php }?>
                           
                           <h2>Users</h2>
                          			   <?php
                                        if($this->session->userdata('logged_in'))
                                        {?>
                                        <ul>
                                            <li>&nbsp;&nbsp;&nbsp;&nbsp;Welcome <?=$this->session->userdata('first_name')?>&nbsp;<?=$this->session->userdata('last_name')?></li>
                                            <li><?=anchor('users/ViewProfile/'.$this->session->userdata('user_id'),'View Profile')?></li>
                                            <li><?=anchor('users/Logout','Logout')?></li>
                                        </ul> 
                                       <?php } else {?>
                                        <ul>
                                            <li><?=anchor('users/Register','Register')?></li>
                                            <li><?=anchor('users/Login','Login')?></li>
                                            <li><?=anchor('users/ForgetPassword','Forget Password')?></li>
                                        </ul>
                                        <?php }?>
                         
                      	  <h2>TagClouds</h2>
                          <?=$TagClouds?>
                            
                      	  <?php if($this->session->userdata('ShowCalendar')==1) {?> 
                   		  <h2>Calendar</h2>
                          <?=$this->calendar->generate();?>
                          <?php }?>
                     
</div>

<div class="clear"></div>
</div>
<div id="footer">
<p><?=$this->session->userdata('BLOGName')?>&copy; All rights Reserved</p>

<p id="credit"><?=$this->session->userdata('BLOGName')?> is powered by <a href="http://speedovation.org">Blogmer</a>|| Design by <a href="http://ramblingsoul.com">RamblingSoul</a>  </p>
</div>
</div>
</body>
</html>
